package think.in.spring.config;

import org.springframework.context.annotation.Bean;

import java.util.ArrayList;
import java.util.List;

public class HierarchicalDemoConfig {

    @Bean
    public String layer1() {
        return "layer1";
    }

    @Bean
    public String forTest() {
        return "forTest--ParentConfig";
    }

    @Bean
    public String layer2() {
        return "layer2";
    }

    @Bean
    public List<String> parentLayerConfig() {
        return new ArrayList<>();
    }

    public static class SubLayerConfig {
        @Bean
        public String sublayer1() {
            return "sublayer1";
        }

        @Bean
        public String sublayer2() {
            return "sublayer2";
        }

        @Bean
        public String forTest() {
            return "forTest--SubLayerConfig";
        }

        @Bean
        public List<String> subLayConfig() {
            return new ArrayList<>();
        }
    }
}
